package com.raincat.toolsdemo;

import android.content.Context;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;

import androidx.appcompat.app.AppCompatActivity;

import com.raincat.tools.multimediapickertools.utils.MultiMediaItem;
import com.raincat.tools.multimediapickertools.utils.PickerConfig;
import com.raincat.tools.multimediapickertools.utils.PickerListener;
import com.raincat.tools.nettools.NetConfig;
import com.raincat.tools.permissiontools.PermissionConfig;
import com.raincat.toolsdemo.learn.LearnStrongActivity;
import com.raincat.toolsdemo.vaccin.HospitalListActivity;
import com.raincat.toolsdemo.vaccin.PersonalInfoActivity;

import java.util.List;

/**
 * <pre>
 *     author : RainCat
 *     org    : Shenzhen JingYu Network Technology Co., Ltd.
 *     e-mail : nining377@gmail.com
 *     time   : 2020/08/16
 *     desc   : 微信小程序功能列表
 *     version: 1.0
 * </pre>
 */
public class WeChatAppletListActivity extends AppCompatActivity {
    private Context context;

    @Override
    public void onCreate(Bundle savedInstanceState) {
        super.onCreate(savedInstanceState);
        setContentView(R.layout.activity_wechatappletlist_main);

        context = WeChatAppletListActivity.this;

        NetConfig.setConnectTimeout(5000);
        listener();

        PermissionConfig.checkPermission(this, null, new String[]{PermissionConfig.PERMISSION_CAMERA, PermissionConfig.PERMISSION_EXTERNAL_STORAGE, PermissionConfig.PERMISSION_EXTERNAL_STORAGE2}, get -> {
            if (get) {
                PickerConfig pickerConfig = new PickerConfig();
                pickerConfig.asImagePick().showCameraOption(true).showOriginalOption(true).showGif(true).withMaxCount(9).start(context, list -> {

                });
            }
        });
    }

    private void listener() {
        findViewById(R.id.btn_zmyy).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                startActivity(new Intent(context, HospitalListActivity.class));
            }
        });

        findViewById(R.id.btn_info).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                startActivity(new Intent(context, PersonalInfoActivity.class));
            }
        });

        findViewById(R.id.btn_xxqg).setOnClickListener(new View.OnClickListener() {
            @Override
            public void onClick(View view) {
                startActivity(new Intent(context, LearnStrongActivity.class));
            }
        });
    }
}
